package cn.iocoder.yudao.framework.common.pojo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

@Data
public class TreeNode {
    public int id;
    public int parentId;
    public String data;

    public List<TreeNode> children;

    public TreeNode(int id, int parentId, String data) {
        this.id = id;
        this.parentId = parentId;
        this.data = data;
        this.children = new ArrayList<>();
    }
}